package com.lmf.webservice.marshaller;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * POJO类，javaBean类型
 * 利用marshaller将Java类转换为xml文件
 */
@XmlRootElement     //作为xml文件的根元素
public class Book {
    private String bookName;
    private double price;
    private int bookid;

    public Book(String bookName, double price, int bookid) {
        this.bookName = bookName;
        this.price = price;
        this.bookid = bookid;
    }

    public Book() {
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getBookid() {
        return bookid;
    }

    public void setBookid(int bookid) {
        this.bookid = bookid;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", price=" + price +
                ", bookid=" + bookid +
                '}';
    }
}
